#include "b5.h"

void b5_init() {}

void b5_run(fifo<D_DCT> *IN, fifo<D_DCT> *OUT) {
  while (IN->len() >= 64) {
    int i,j;
    D_DCT tmp[64];
    for (i=0; i<8; ++i)
      for (j=0; j<8; ++j)
	tmp[i*8+j] = IN->read();
    for (i=0; i<8; ++i)
      for (j=0; j<8; ++j)
	OUT->write(tmp[i+j*8]);
  }
}

